//
// Created by haoy on 2018/1/2.
//

#ifndef RTC_XSWITCH2_MIXER_MANAGER_HPP
#define RTC_XSWITCH2_MIXER_MANAGER_HPP

#include <glib.h>
#include <string>

#include "xrtc_endpoint.h"

const int mixer_manager_error_already_added = 1;
const int mixer_manager_error_add_failed = 2;

class rtc_recorder;
typedef rtc_recorder* rtc_recorder_t;

void* mixer_manager_new(GMainContext* main_context, rtc_recorder_t recorder);
void mixer_manager_delete(void* mixer_manager);
int mixer_manager_add_rtc(void* mix_manager, rtc_endpoint_t rtc, const std::string &mixer_id, bool is_recording,
                          const std::string& out_path, const std::string& ctx, bool& is_mixer_new, std::string& link_addr);
std::string mixer_manager_strerr(int err);
void* mixer_manager_get_mixer(void* mixer_manager, const std::string& mixer_id);
bool mixer_manager_setup_remote(void* mixer_manager, std::string& link_addr);

#endif //RTC_XSWITCH2_MIXER_MANAGER_HPP
